# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-pycurl
_pkgname=pycurl
pkgver=7.45.1
pkgrel=2
epoch=1
pkgdesc='A Python Interface To The cURL library.'
url='https://pypi.org/project/pycurl/#files'
arch=('x86_64' 'aarch64')
license=('MIT' 'LGPL')
depends=('python2' 'curl')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('05639d484aac6d6688677589e391975158c5ef778456a47df575ad13fb8bd0db67ff8f5a39bdd99d82a67926aca421c01e687eec9d4fd87f32822b492b429635')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  rm -rf "$pkgdir/usr/share"
}

